import request from '@/utils/request'

// 登录
export function login(data) {
  return request({
    url: '/signin',
    method: 'post',
    //withCredentials: true, //跨域允许携带cookie
    //timeout: 30000,
    //headers: { 'Content-Type': 'application/json', 'request-ajax': true },
    data
  })
}

// 注册
export function signup(data) {
  return request({
    url: '/signup',
    method: 'post',
    data,
    headers: {
      'content-type': 'multipart/form-data'
    }
  })
}

// 退出
export function logout(data) {
  return request({
    url: '/logout',
    method: 'post',
    data,
  })
}

// 修改密码
export function modify_password(data) {
  return request({
    url: '/modifypwd',
    method: 'post',
    data,
  })
}

// 修改个人信息
export function modify_userinfo(data) {
  return request({
    url: '/modifyinfo',
    method: 'post',
    data,
  })
}